package com.ruoyi.mdm.mapper;

import com.ruoyi.mdm.domain.SkuMasterSub;
import com.ruoyi.mdm.domain.SkuMergeMasterSub;
import com.ruoyi.mdm.domain.SkuProductMasterSub;
import com.ruoyi.mdm.domain.SkuSampleMasterSub;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * spu子Mapper接口
 *
 * @author shiseido
 * @date 2025-03-01
 */
@Repository
public interface SkuSampleMasterSubMapper {
    /**
     * 查询spu子
     *
     * @param id spu子主键
     * @return spu子
     */
    public SkuSampleMasterSub selectSkuSampleMasterSubById(Long id);

    /**
     * 查询sku子
     *
     * @param skuCode sku编码
     * @return sku子
     */
    public SkuSampleMasterSub selectSkuSampleMasterSubBySkumCode(@Param("ownerId") String ownerId,
                                                    @Param("skuCode") String skuCode);

    /**
     * 查询spu子列表
     *
     * @param skuProductMasterSub spu子
     * @return spu子集合
     */
    public List<SkuSampleMasterSub> selectSkuSampleMasterSubList(SkuSampleMasterSub skuProductMasterSub);

    /**
     * 新增spu子
     *
     * @param skuProductMasterSub spu子
     * @return 结果
     */
    public int insertSkuSampleMasterSub(SkuSampleMasterSub skuProductMasterSub);

    /**
     * 修改spu子
     *
     * @param skuProductMasterSub spu子
     * @return 结果
     */
    public int updateSkuSampleMasterSub(SkuSampleMasterSub skuProductMasterSub);

    public int deleteSkuSampleMasterSubById(Long id);


    public SkuSampleMasterSub selectSkuSampleMasterSubBySkuCode(@Param("ownerId") String ownerId,
                                                              @Param("skuCode") String skuCode);
    /**
     * 批量删除spu子
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSkuSampleMasterSubByIds(Long[] ids);

    /**
     * 删除spu子
     *
     * @param spuCode spu编码
     * @return 结果
     */
    public int deleteSkuSampleMasterSubBySpuCode(String spuCode);



}
